package com.iyue;

import org.springframework.context.support.AbstractApplicationContext;

/**
 * 《Spring》帮助类
 * 
 * @author 孙晓晔
 * @version $Id: SpringHelper.java,v 1.1 2010/10/14 17:07:15 fresh Exp $
 */
public class SpringHelper {

	/**
	 * 获取spring依赖注入的对象
	 * 
	 * @param name
	 * @return Object Bean
	 */
	public static Object getBean(String name) {
		AbstractApplicationContext ctx = AppContext.getInstance()
				.getAppContext();

		return ctx.getBean(name);
	}
}
